package com.demo.entity;

/*
 *创建日期：2021/4/26/16:14
 */


import indi.mybatis.flying.annotations.FieldMapperAnnotation;
import indi.mybatis.flying.annotations.TableMapperAnnotation;
import org.apache.ibatis.type.JdbcType;

import java.io.Serializable;


@TableMapperAnnotation(tableName = "student")
public class Student implements Serializable {

    @FieldMapperAnnotation(dbFieldName = "id",jdbcType = JdbcType.VARCHAR,isUniqueKey = true)
    private String id;

    @FieldMapperAnnotation(dbFieldName = "name",jdbcType = JdbcType.VARCHAR)
    private String name;

    @FieldMapperAnnotation(dbFieldName = "age",jdbcType = JdbcType.INTEGER)
    private Integer age;

    @FieldMapperAnnotation(dbFieldName = "gender",jdbcType = JdbcType.INTEGER)
    private Integer gender;

    public Student(String id, String name, Integer age, Integer gender) {
        this.id = id;
        this.name = name;
        this.age = age;
        this.gender = gender;
    }

    public Student() {
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Integer getGender() {
        return gender;
    }

    public void setGender(Integer gender) {
        this.gender = gender;
    }

    @Override
    public String toString() {
        return "Student{" +
                "id='" + id + '\'' +
                ", name='" + name + '\'' +
                ", age=" + age +
                ", gender=" + gender +
                '}';
    }
}
